package com.ln.prac.base.m202206.d23.interpret;

import java.util.HashMap;
import java.util.Map;

/**
 * <pre>
 *  上下文
 * </pre>
 *
 * @Author zhangj
 * @Date 2022/6/23 19:13
 */
public class Context {

    private Map<Variable, Integer> variableIntegerMap = new HashMap<>();

    public Integer getVal(Variable variable) {
        return variableIntegerMap.get(variable);
    }

    public void assign(Variable variable, Integer val) {
        variableIntegerMap.put(variable, val);
    }



}
